package com.example.dao;


import com.example.dto.AddressTDO;
import com.example.entity.Address;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AddressDao {

    List<Address> getAddressByUserId(@Param("userId") Integer userId);

    void addAddress(Address address);

    void deleteAddressById(@Param("id") Integer id);

    void updateAddress(Address address);

    Address getAddressById(Integer id);

    void setDefault(Integer id,String modifiedUser);

    Address getDefaultAddress(Integer userId);

    int setNunDefault(Integer id);

    void cancelDefault(Integer userId);

}
